/* eslint-disable import/prefer-default-export */
import request from '@/utils/request';

export async function getList(params) {
  return request(`/nsApi/oncefeePay/queryPayPage`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function markCharge(params) {
  return request('/nsApi/onceChrg/collectFee', {
    method: 'POST',
    body: params,
  });
}

export async function markPay(params) {
  return request('/nsApi/oncefeePay/collectFee', {
    method: 'POST',
    body: params,
  });
}

// 获取接单方列表
export async function getSupplyListData(params) {
  return request('/nsApi/supplier/querySuppList', {
    method: 'POST',
    body: params,
  });
}

// 确定
export async function confirm(params) {
  return request('/nsApi/oncefeePay/confirmToLocal', {
    method: 'POST',
    body: params,
  });
}

// 拒绝
export async function refuse(params) {
  return request('/nsApi/oncefeePay/refuse', {
    method: 'POST',
    body: params,
  });
}

// 获取列表状态
export async function getListStatus(params) {
  return request('/nsApi/mdm/nmDict/queryDictItemsByCodes', {
    method: 'POST',
    body: params,
  });
}

// 获取详情数据
export async function getOnceDetail(params) {
  return request('/nsApi/oncefeePay/getPayDetails', {
    method: 'POST',
    body: params,
  });
}

// 获取详情数据
export async function getDetailList(params) {
  return request('/nsApi/oncefeePay/queryPayDetPage', {
    method: 'POST',
    body: params,
  });
}

// 获取签约方下拉数据
export async function getSuppDataList(params) {
  return request('/nsApi/supplier/querySuppList', {
    method: 'POST',
    body: params,
  });
}

// 获取客户下拉数据
export async function getCustList(params) {
  return request('/nsApi/customer/custNameListBySupp', {
    method: 'POST',
    body: params,
  });
}

// 发送签约方
export async function getSendOrdSndr(params) {
  return request('/nsApi/onceChrg/sendOrdSndr', {
    method: 'POST',
    body: params,
  });
}

// 作废
export async function getToVoid(params) {
  return request('/nsApi/onceChrg/updataChrgFeeSta', {
    method: 'POST',
    body: params,
  });
}

// 获取列表数据
export async function getOnceDataList(params) {
  return request('/nsApi/onceChrg/queryChrgPage', {
    method: 'POST',
    body: params,
  });
}

// 全国收费一次性新增的列表
export async function getNsOnceAddDataList(params) {
  return request('/nsApi/onceChrg/updataListDet', {
    method: 'POST',
    body: params,
  });
}

// 获取产品下拉
export async function getProductListData(params) {
  return request('/nsApi/baseProductQuery/queryOnceFee', {
    method: 'POST',
    body: params,
  });
}

// 下载模板
export async function downloadFile(params) {
  return request('/csApi/oncefeeFile/downloadTemplate', {
    method: 'POST',
    body: params,
  });
}

// 根据签约方获取客户名称
export async function getCustNameListData(params) {
  return request('/nsApi/customer/custNameListBySupp', {
    method: 'POST',
    body: params,
  });
}

// 员工明细文件上传
export async function uploadFileDataList(params) {
  return request('/nsApi/batchTask/getBatTaskInfo', {
    method: 'POST',
    body: params,
  });
}

// 收费一次性 新增 提交
export async function addOnceDataList(params) {
  return request('/nsApi/onceChrg/insertSubmit', {
    method: 'POST',
    body: params,
  });
}

// 删除某个员工明细
export async function deleteRecordData(params) {
  return request('/nsApi/onceChrg/deleteDraftDet', {
    method: 'POST',
    body: params,
  });
}

// 一次性模态框提交
export async function modalData(params) {
  return request('/nsApi/onceChrg/insertEmp', {
    method: 'POST',
    body: params,
  });
}

// 收费一次性详情
export async function getDetail(params) {
  return request('/nsApi/onceChrg/getChrgDetails', {
    method: 'POST',
    body: params,
  });
}

// 收费一次性详情 - 员工明细
export async function getDetailListData(params) {
  return request('/nsApi/onceChrg/queryChrgDetPage', {
    method: 'POST',
    body: params,
  });
}

// 收费一次性修改详情
export async function getUpdateDetailData(params) {
  return request('/nsApi/onceChrg/updataGet', {
    method: 'POST',
    body: params,
  });
}

// 修改提交
export async function updateSubmitData(params) {
  return request('/nsApi/onceChrg/updateSubmit', {
    method: 'POST',
    body: params,
  });
}

// ylq

// 雇员姓名模糊查询
export async function getEmpNameList(params) {
  return request(`/nsApi/recvAdd/list/hdl`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

// 批量上传：收费管理
export async function uploadFileCharge(params) {
  return request(`/nsApi/onceChrg/uploadChrg`, {
    method: 'POST',
    body: params,
  });
}
